grammar mark;
markdown: block* EOF?;

block: blockText | blockCode+ | NL;
blockCode: BLOCK_CODE;
blockText: text;
text: TEXT;

CODE: '```';
BLOCK_CODE: CODE ~[`]+ CODE;
NL: '\r'? '\n';
TEXT: ~[\r\n]+;